package com.ls;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

@Slf4j
@SpringBootApplication
@MapperScan(basePackages = "com.ls.mapper")
public class ProductApplication {
    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(ProductApplication.class, args);
    }


    @Bean
    public IRule initRule(){
        return new RoundRobinRule();
    }

}
